-- GENERATED SPELL FOR [Jademir Boughguard] --


function spell0_5320(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(20666,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5320', 606, 1)
end

function spell1_5320(pUnit, Event) --@Fixate,n/a--
pUnit:FullCastSpellOnTarget(12021,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5320', 10348, 1)
end

function spell2_5320(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(15708,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5320', 5264, 1)
end

function Sorts_5320(pUnit, Event)
local choix_sorts_5320 = math.random(0, 2)
if choix_sorts_5320 == 0 then
pUnit:RegisterEvent('spell0_5320', 1, 1)
end
if choix_sorts_5320 == 1 then
pUnit:RegisterEvent('spell1_5320', 1, 1)
end
if choix_sorts_5320 == 2 then
pUnit:RegisterEvent('spell2_5320', 1, 1)
end
end

function mob5320_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5320', math.random(1500, 3000), 1)
end

function mob5320_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5320_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5320_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5320, 1, 'mob5320_Action')
RegisterUnitEvent(5320, 2, 'mob5320_Leave')
RegisterUnitEvent(5320, 3, 'mob5320_Kill')
RegisterUnitEvent(5320, 4, 'mob5320_Die')
